
import java.awt.*;

import javax.swing.*;


public class VideoImport2 extends JPanel {
    private JLabel jLabel = new JLabel("비디오입고");
    private JLabel jLabel1 = new JLabel("고유번호");
    private JLabel jLabel2 = new JLabel("제목");
    private JLabel jLabel3 = new JLabel("등급");
    private JLabel jLabel4 = new JLabel("대여금액");
    private JTextField vid = new JTextField(15);
    private JTextField jemok = new JTextField(15);
    private JTextField amt = new JTextField(15);
    private JComboBox grade = new JComboBox();
    private JButton jButton = new JButton("입고");
    private GridBagConstraints c;
    private GridBagLayout gb=new GridBagLayout();
    public VideoImport2() {
        init();
    }
    
    public void init() {
        //layout
        
        setLayout(gb);
       
        
        /*
        c=new GridBagConstraints();
        c.anchor = GridBagConstraints.EAST;
        gb.setConstraints(jLabel1, c);
        this.add(jLabel1);
        
        c=new GridBagConstraints();
        c.anchor = GridBagConstraints.WEST;
        c.gridwidth = GridBagConstraints.REMAINDER;
        //c.weightx = 1.0D;
        gb.setConstraints(vid, c);
        this.add(vid);
        */
        
        jLabel.setFont(new Font("Dialog", Font.BOLD, 24));
        
        layout(jLabel);
        
        layout(jLabel1, vid);
        layout(jLabel2, jemok);
        layout(jLabel3, grade);
        layout(jLabel4, amt);
        
        layout(jButton);
        
        
        
        grade.addItem("유아");
        grade.addItem("아동");
        grade.addItem("청소년");
        grade.addItem("고전");

        
    }
    
    private void layout(Component cont) {
        c=new GridBagConstraints();
        c.anchor = GridBagConstraints.CENTER;
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.insets = new Insets(25, 5, 0, 0);
        //c.weightx = 1.0D;
        gb.setConstraints(cont, c);
        this.add(cont);
        //test
    }
    
    private void layout(Component label, Component cont) {
        c=new GridBagConstraints();
        c.anchor = GridBagConstraints.EAST;
        c.insets = new Insets(25, 5, 0, 0);
        gb.setConstraints(label, c);
        this.add(label);
        
        c=new GridBagConstraints();
        c.anchor = GridBagConstraints.WEST;
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.insets = new Insets(25, 5, 0, 0);
        //c.weightx = 2.0D;
        gb.setConstraints(cont, c);
        this.add(cont);
    }
    public static void main(String[] args){
		
	}
    
}